<?php class a { public $b; public function __construct() { $this->b[0] = new c(); }}class c { public $d = "d";}$a1 = new a();$get1 = "b";$a2 = $a1->$get1;$get2 = "d";echo $a2[0]->$get2;